package com.dftdla.util;

/**
 * @author 14501
 */
public enum Code {
    /**
     * success
     */
    SUCCESS(200,"服务器响应成功"),
    /**
     * bad request
     */
    BAD_REQUEST(400,"请求出错"),
    /**
     * user need login
     */
    USER_NEED_LOGIN(2001,"用户尚未登录"),
    /**
     * bad error
     */
    BAD_ERROR(500,"服务器内部错误"),
    /**
     * user error
     */
    USER_ERROR(4001,"用户账户无法正常使用"),
    USER_AUTH_ERROR(4002,"鉴权失败");

    public Integer code;
    public String msg;

    /**
     * @param code 状态码
     * @param msg  消息
     */
    Code(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
